package com.zcgk.core.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/****************************************************
 *
 * CodeMsg
 *
 *
 * @author Francis
 * @date 2020/1/19 15:12
 * @version 1.0
 **************************************************/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CodeMsg {

    private int code;
    private String msg;


    /**
     * db_error
     */
    public static CodeMsg DB_ERROR  = new CodeMsg(1000, "数据库异常");

    /**
     * insert异常
     */
    public static CodeMsg INSERT_ERROR  = new CodeMsg(1001, "新增数据失败，请检查数据有效性");

    /**
     * update delete异常
     */
    public static CodeMsg DATA_NO_EFFECT  = new CodeMsg(1002, "未处理到任何一行, 请检查数据有效性");

    /**
     * select异常
     */
    public static CodeMsg DATA_IS_EMPTY  = new CodeMsg(1003, "未查询到任何一条数据");

    /**
     * 参数校验异常
     */
    public static CodeMsg PARAM_NOT_PASS  = new CodeMsg(1004, "参数校验不通过");

    /**
     * 服务器内部错误 通用异常返回
     */
    public static CodeMsg SERVICE_ERROR  = new CodeMsg(1005, "服务器内部错误");

    /**
     * 绑定参数异常
     */
    public static CodeMsg BIND_ERROR  = new CodeMsg(1006, "绑定参数异常");
    public static CodeMsg BIND_ERROR_OF_ATT_TYPE_ERROR  = new CodeMsg(1007, "绑定参数异常：无法获取附件类型");

    /**
     * redis存储
     */
    public static CodeMsg KEY_AND_VALUE_MUST_BE_NOT_EMPTY  = new CodeMsg(1100, "Key And Value Must Be Not Empty");
    public static CodeMsg KEY_MUST_BE_NOT_EMPTY  = new CodeMsg(1101, "Key Must Be Not Empty");
    public static CodeMsg CLASS_MUST_BE_NOT_EMPTY  = new CodeMsg(1102, "Class Must Be Not Empty");
    public static CodeMsg TIME_AND_UNIT_MUST_BE_NOT_EMPTY  = new CodeMsg(1103, "失效时间和时间单位，均不能为空");

    /**
     * 文件api相关
     */
    public static CodeMsg FILE_UPLOAD_ERROR  = new CodeMsg(1200, "文件上传失败！");
    public static CodeMsg FILE_PATH_FIND_ERROR  = new CodeMsg(1201, "查询路径失败！");
    public static CodeMsg SYSTEM_ID_IS_EMPTY  = new CodeMsg(1202, "系统Id不能为空！");
    public static CodeMsg RESOURCE_ID_IS_EMPTY  = new CodeMsg(1203, "资源Id不能为空！");
    public static CodeMsg TABLE_NAME_IS_EMPTY  = new CodeMsg(1204, "资源Id不能为空！");
    public static CodeMsg ATTACHMENT_ID_IS_EMPTY  = new CodeMsg(1205, "主键Id不能为空！");
    public static CodeMsg DOWNLOAD_FILE_ERROR  = new CodeMsg(1206, "文件下载失败！");

    /**
     * excel api相关
     */
    public static CodeMsg EXCEL_IS_ERROR = new CodeMsg(1207,"excel文件有误，请核实后重试！");
    public static CodeMsg FILE_IS_NOT_EXCEL = new CodeMsg(1208,"请上传以xls或xlsx结尾的excel文件！");
    public static CodeMsg EXCEL_BIND_ENTITY_ERROR = new CodeMsg(1209,"绑定数据失败！");
    public static CodeMsg EXCEL_NAME_ERROR = new CodeMsg(1210,"格式化excel名称失败！");
    public static CodeMsg EXCEL_EXPORT_ERROR = new CodeMsg(1211,"Excel导出失败！");

}